import QtQuick 2.5

Canvas{
    id:canvas
    x:320
    y:200
    width: 200
    height: 200
    smooth: true
    onPaint: {
        //获取画布上下文
        var ctx=getContext("2d")
        ctx.strokeStyle="white"
        ctx.fillRect(0,0,200,200)
        ctx.shadowColoe="blue"
        ctx.shadowOffsetX=2
        ctx.shadowOffsetY=2
        ctx.shadowBlur=10
        ctx.font="Bold 80px Ubuntu"
        ctx.fillStyle="#33a9ff"
        ctx.fillText("Earth",30,180)
    }
}
